package com.turing.draw.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.turing.orm.model.domain.common.BaseDo;
import io.swagger.annotations.ApiModel;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @Description
 * @Author livin
 * @Date 2021-11-10
 */
@ApiModel(value = "FileTask")
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class FileTask extends BaseDo<FileTask> {

    @TableId(value = "task_sn", type = IdType.UUID)
    private String taskSn;

    @TableField("file_name")
    private String fileName;

    @TableField("file_type")
    private String fileType;

    @TableField("parent_task_sn")
    private String parentTaskSn;

    @TableField("file_url")
    private String fileUrl;

    @TableField("json_url")
    private String JSONUrl;

    @TableField("ocr_json_url")
    private String ocrJsonUrl;

    @TableField("clean_text_url")
    private String cleanTextUrl;

    @TableField("template_id")
    private String templateId;

    @TableField("template_group")
    private Integer templateGroup;

    @TableField("total_page")
    private Integer totalPage;

    @TableField("file_ext")
    private String fileExt;

    @TableField("file_status")
    private Integer fileStatus;

    @TableField("main_task_processing")
    private Integer mainTaskProcessing;

    @TableField("pre_processor_domain")
    private String preProcessorDomain;

    @TableField("pre_processor_warning_time")
    private LocalDateTime preProcessorWarningTime;

    @TableField("pre_processor_retry_count")
    private int preProcessorRetryCount;

    @TableField("ocr_type")
    private int ocrType;

    @TableField("forecast_domain")
    private String forecastDomain;

    @TableField("forecast_warning_time")
    private LocalDateTime forecastWarningTime;

    @TableField("forecast_retry_count")
    private int forecastRetryCount;

    @TableField("analysis_domain")
    private String analysisDomain;

    @TableField("analysis_warning_time")
    private LocalDateTime analysisWarningTime;

    @TableField("analysis_retry_count")
    private int analysisRetryCount;

    @TableField("is_del")
    private Integer isDel;

    @TableField("created_by")
    private Integer createdBy;

    /**
     * 是否属于电子档文件
     */
    @TableField("belongs_elec")
    private Integer belongsElec;

    @TableField("pdf_url")
    private String pdfUrl;

    @TableField("table_json_url")
    private String tableJsonUrl;

    @TableField("parent_file_task_sn")
    private String parentFileTaskSn;

    @Override
    protected Serializable pkVal() {
        return this.taskSn;
    }

}

